home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************************
- * *
- * Bob Flag *
- * *
- * Start Date : 10/3/91 *
- * Last Update : 10/3/91 *
- * Code : Melt Down *
- * *
- *****************************************************************************
-
- ; Include the macros
-
- Incdir Df1:
- Include Source/Macro
-
- *****************************************************************************
-
- ; Dont forget to use chip ram
-
- Chip
-
- *****************************************************************************
-
- ; Kill the operating system for good mesure
-
- Kill
-
- *****************************************************************************
-
- ; Load custom and set up copper list
-
- Lea Custom,A5
- Move.l #Copper,Cop1lch(a5)
-
- *****************************************************************************
-
- ; Main routine here
-
- Mouse
- Move.l $dff004,d2
- And.l #$1ff00,d2
- Cmp.l #$100,d2
- Bne.s Mouse
- Eor.w #$5000,ScreenPtr+2
- Eor.w #$5000,Plne1l+2
- Eor.w #$5000,Plne2l+2
- Bsr Clear
- Bsr DoFlag
- Tstmice Mouse ; Pressed the mouse
-
- *****************************************************************************
-
- ; Return operating system and go back to user
-
- Heal
- Clr.l D0 ; No error
- Rts
-
- *****************************************************************************
-
- Clear
- Blitwait ; Blitter Nasty But Why Do
- Move.l #$01000000,Bltcon0(a5) ; Clear
- Move.w #$0000,Bltdmod(a5) ; Skip No Bytes
- Move.l ScreenPtr,A0
- Move.l a0,Bltdpth(A5) ; Set Dest
- Move.l #-1,Bltafwm(a5) ; Use All Bits
- Move.w #220*64+20,Bltsize(a5) ; Fill Half Screen
- Movem.l a0-a6/d0-d7,-(a7) ; Save The Regs
- Movem.l RegFiller(pc),a1-a6/d0-d7 ; Clear The Regs
- Add.w #17600,A0
- Rept 158
- Movem.l a1-a6/d0-d7,-(a0) ; Clear 56 Butes
- Endr ; End repeat
- Movem.l (a7)+,a0-a6/d0-d7 ; Restor Regs
- Rts
- RegFiller
- Dcb.l 16,0
- Rts
-
- *****************************************************************************
-
- DoFlag
- Blitwait
- Move.w #-2,Bltamod(a5)
- Move.w #-2,Bltbmod(a5)
- Move.w #36,Bltcmod(a5)
- Move.w #36,Bltdmod(a5)
- Move.l #$ffff0000,Bltafwm(a5)
- Add.w #2,Xptr
- And.w #$7e,Xptr
- Add.w #2,Yptr
- And.w #$7e,Yptr
- Lea Bobs,A0
- Lea XSin,A1
- Add.w Xptr,A1
- Lea YSin,A2
- Add.w Yptr,A2
-
- Lea Shifts,A3
- Move.l #BobMask,a4
- Move.l #Bob,a6
- Move.w #16*64+2,D4
- Move.l ScreenPtr,D5
- Move.w (a0)+,d7
-
- Move.l a4,bltapth(A5)
- Move.l a6,bltbpth(A5)
- Move.l D5,bltcpth(A5)
- Move.l D5,bltdpth(A5)
-
- Move.w #8,D2
- Move.w #10,D3
- Move.l D5,D6
- BobLoop
- Movem.w (a0)+,d0-d1 ; Get X Y
- Add.w (a1),d0
- Add.w (a2),d1
- Add.w d2,a1
- Add.w d3,a2
- Move.w D6,D5
- Add.w D1,D5
- Add.w (a3,d0),D5 ; D5 Bob Pos
- Move.l 2(a3,d0),Bltcon0(a5)
- Move.w a4,bltaptl(A5)
- Move.w a6,bltbptl(A5)
- Move.w D5,bltcptl(A5)
- Move.w D5,bltdptl(A5)
- move.w d4,bltsize(A5)
- Dbf D7,BobLoop
- Rts
-
- *****************************************************************************
-
- StShift Macro
- Dc.w \1,$0fca,$0000
- Dc.w \1,$1fca,$1000
- Dc.w \1,$2fca,$2000
- Dc.w \1,$3fca,$3000
- Dc.w \1,$4fca,$4000
- Dc.w \1,$5fca,$5000
- Dc.w \1,$6fca,$6000
- Dc.w \1,$7fca,$7000
- Dc.w \1,$8fca,$8000
- Dc.w \1,$9fca,$9000
- Dc.w \1,$afca,$a000
- Dc.w \1,$bfca,$b000
- Dc.w \1,$cfca,$c000
- Dc.w \1,$dfca,$d000
- Dc.w \1,$efca,$e000
- Dc.w \1,$ffca,$f000
- Endm
- Shifts
- StShift 0
- StShift 2
- StShift 4
- StShift 6
- StShift 8
- StShift 10
- StShift 12
- StShift 14
- StShift 16
- StShift 18
- StShift 20
- StShift 22
- StShift 24
- StShift 26
- StShift 28
- StShift 30
- StShift 32
- StShift 34
- StShift 36
- StShift 38
- StShift 40
-
- *****************************************************************************
-
- ScreenPtr
- Dc.l $70000
-
- *****************************************************************************
-
- ; All copper list after here
-
- Copper
-
- Spr_Off ; Switch sprites off
- Cmove $2c81,Diwstrt
- Cmove $2cc1,Diwstop
- Cmove $0038,Ddfstrt
- Cmove $00d0,Ddfstop
- Cmove $0028,Bpl1mod
- Cmove $0028,Bpl2mod
- Cmove $0000,Color00
- Cmove $0f00,Color01
- Cmove $0a00,Color02
- Cmove $0700,Color03
- Cmove $2200,Bplcon0
- Cmove $0007,Bpl1pth
- Plne1l Cmove $0000,Bpl1ptl
- Cmove $0007,Bpl2pth
- Plne2l Cmove $0028,Bpl2ptl
- Endcop
-
- *****************************************************************************
-
- XY Macro
- Dc.w \1*6,\2*80
- Endm
- Bobs
- A Set 0
- Dc.w 150-1
- Rept 10
- Xy 005,(000+a)
- Xy 025,(000+a)
- Xy 045,(000+a)
- Xy 065,(000+a)
- Xy 085,(000+a)
- Xy 105,(000+a)
- Xy 125,(000+a)
- Xy 145,(000+a)
- Xy 165,(000+a)
- Xy 185,(000+a)
- Xy 205,(000+a)
- Xy 225,(000+a)
- Xy 245,(000+a)
- Xy 265,(000+a)
- Xy 285,(000+a)
- A set A+20
- Endr
-
- *****************************************************************************
-
- XPtr
- Dc.w 0
- YPtr
- Dc.w 0
- XSin
- Rept 14
- dc.w 16*6,16*6,16*6,16*6,15*6,15*6,15*6,14*6
- dc.w 14*6,13*6,12*6,12*6,11*6,10*6,10*6,9*6
- dc.w 8*6,7*6,6*6,6*6,5*6,4*6,4*6,3*6
- dc.w 2*6,2*6,1*6,1*6,1*6,0*6,0*6,0*6
- dc.w 0*6,0*6,0*6,0*6,1*6,1*6,1*6,2*6
- dc.w 2*6,3*6,4*6,4*6,5*6,6*6,6*6,7*6
- dc.w 8*6,9*6,10*6,10*6,11*6,12*6,12*6,13*6
- dc.w 14*6,14*6,15*6,15*6,15*6,16*6,16*6,16*6
- Endr
- YSin
- Rept 14
- dc.w 16*80,16*80,16*80,16*80,15*80,15*80,15*80,14*80
- dc.w 14*80,13*80,12*80,12*80,11*80,10*80,10*80,9*80
- dc.w 8*80,7*80,6*80,6*80,5*80,4*80,4*80,3*80
- dc.w 2*80,2*80,1*80,1*80,1*80,0*80,0*80,0*80
- dc.w 0*80,0*80,0*80,0*80,1*80,1*80,1*80,2*80
- dc.w 2*80,3*80,4*80,4*80,5*80,6*80,6*80,7*80
- dc.w 8*80,9*80,10*80,10*80,11*80,12*80,12*80,13*80
- dc.w 14*80,14*80,15*80,15*80,15*80,16*80,16*80,16*80
- Endr
-
- *****************************************************************************
-
- Bob Incbin Gfx/8x8bob
- BobMask Incbin Gfx/8x8bobmask
-
- *****************************************************************************
-
-